package me.keiwu.pub.rpc;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by kei on 29/12/2017.
 */
public interface LogErrorRpcPub {

    @Async
    @RequestMapping("/rpc/log/log/error")
    void logError(@RequestParam("requestUri") String requestUri,
                  @RequestParam("localIp") String localIp,
                  @RequestParam("className") String className,
                  @RequestParam("func") String func,
                  @RequestParam("message") String messsage);


    @Component
    class Fallback implements LogErrorRpcPub {

        @Override
        public void logError(String requestUri, String localIp, String className, String func, String messsage) {

        }
    }

}
